<template>
  <div>
    <el-table
      ref="multipleTable"
      :data="tableData"
      style="width: 100%; font-size:12px"
      tooltip-effect="dark"
      border
      :height="$store.state.app.tableHeight"
      @selection-change="handleSelectionChange"
    >
      <el-table-column type="expand">
        <template slot-scope="props">
          <el-form label-position="left" inline class="demo-table-expand">
            <el-form-item label="库位编号">
              <span>{{ props.row.storehouse_content.storehouse_name }}</span>
            </el-form-item>
            <el-form-item label="产品代码">
              <span>{{ props.row.brand_product_content.product_code_num }}</span>
            </el-form-item>
            <el-form-item label="产品名称">
              <span>{{ props.row.brand_product_content.brand_product_name }}</span>
            </el-form-item>
            <el-form-item label="规格">
              <span>{{ props.row.brand_product_content.gg }}</span>
            </el-form-item>
            <el-form-item label="批号">
              <span>{{ props.row.production_num }}</span>
            </el-form-item>
            <el-form-item label="生产日期">
              <span>{{ props.row.production_date }}</span>
            </el-form-item>
            <el-form-item label="单位">
              <span>{{ props.row.brand_product_content.pany }}</span>
            </el-form-item>
          </el-form>
        </template>
      </el-table-column>
      <el-table-column
        type="selection"
        width="55"
        align="center"
      />
      <el-table-column
        label="入库单号"
        prop="production_order_num"
        width="120"
        align="center"
      />
      <el-table-column
        label="入库时间"
        prop="production_order_date"
        width="90"
        align="center"
      />
      <el-table-column
        label="仓库名称"
        align="center"
      >
        <template slot-scope="scope">
          <span>{{ scope.row.warehouse_content.warehouse_name?scope.row.warehouse_content.warehouse_name:'' }}</span>
        </template>
      </el-table-column>
      <el-table-column
        label="库位名称"
        align="center"
      >
        <template slot-scope="scope">
          <span>{{ scope.row.storehouse_id ? scope.row.storehouse_content.storehouse_name:'' }}</span>
        </template>
      </el-table-column>
      <el-table-column
        label="总数量"
        prop="count_all_num"
        width="80"
        align="center"
      />
      <el-table-column
        label="大条码数"
        prop="big_bar_code_num_count"
        width="50"
        align="center"
      />
      <el-table-column
        label="中条码数"
        prop="in_bar_code_num_count"
        width="50"
        align="center"
      />
      <el-table-column
        label="小条码数"
        prop="small_bar_code_num_count"
        width="50"
        align="center"
      />
      <!-- <el-table-column
        label="备注"
        prop="desc"
        align="center"
      /> -->
      <el-table-column
        label="上传账号"
        align="center"
      >
        <template slot-scope="scope">
          {{ scope.row.bar_code_user_content.name }} ( {{ scope.row.bar_code_user_content.user_name }} )
        </template>
      </el-table-column>
      <!-- <el-table-column
        label="录入时间"
        prop="bar_code_user_id"
      /> -->
      <!-- <el-table-column
        label="确认账号"
        prop="desc"
      />
      <el-table-column
        label="确认时间"
        prop="desc"
      /> -->
    </el-table>
  </div>
</template>

<script>
export default {
  props: {
    tableData: {
      type: Array,
      default() {
        return []
      }
    }
  },
  data() {
    return {
      // tableData: [
      //   {
      //     name: 'wac',
      //     shop: 'jdkjj',
      //     id: '012',
      //     shopId: '123',
      //     category: '淡淡的',
      //     address: '天津',
      //     desc: 'desc'
      //   },
      //   {
      //     name: 'liyx',
      //     shop: 'dddd',
      //     id: '013',
      //     shopId: '143',
      //     category: '芭芭拉',
      //     address: '北京',
      //     desc: '额额额额'
      //   }
      // ]
    }
  },
  methods: {
    handleSelectionChange(val) {
      this.$emit('selectedVal', val)
    }
  }
}
</script>

<style lang="scss" scoped>
</style>
